﻿using System.Threading.Tasks;

namespace Restful.Net
{
    public interface IUserAuthenticator
    {
        Task<IUser> AuthenticateAsync(string userName, string password);
    }

    public class AnonymousAuthenticator : IUserAuthenticator
    {
        public Task<IUser> AuthenticateAsync(string userName, string password)
        {
            return Task.Factory.StartNew<IUser>(() => new AnonymousUser());
        }
    }
}
